package org.eiahe.hr.employeeRelation.service;

import org.eiahe.hr.employeeRelation.domain.bo.RewardPunishmentApplicationBo;
import org.eiahe.hr.employeeRelation.domain.bo.RewardPunishmentRecordBo;
import org.eiahe.hr.employeeRelation.domain.vo.RewardPunishmentApplicationVo;
import org.eiahe.hr.employeeRelation.domain.vo.RewardPunishmentRecordVo;
import org.ehe.common.mybatis.core.page.PageQuery;
import org.ehe.common.mybatis.core.page.TableDataInfo;

import java.util.List;

/**
 * 奖惩管理服务接口
 *
 * @author zhangnn
 */
public interface IRewardPunishmentService {

    /**
     * 查询奖惩申请列表
     *
     * @param bo 奖惩申请业务对象
     * @return 奖惩申请列表
     */
    List<RewardPunishmentApplicationVo> selectRewardPunishmentApplicationList(RewardPunishmentApplicationBo bo);

    /**
     * 查询奖惩申请列表(分页)
     *
     * @param bo        奖惩申请业务对象
     * @param pageQuery 分页参数
     * @return 奖惩申请分页列表
     */
    TableDataInfo<RewardPunishmentApplicationVo> selectRewardPunishmentApplicationList(
                    RewardPunishmentApplicationBo bo,
                    PageQuery pageQuery);

    /**
     * 通过申请ID查询奖惩申请信息
     *
     * @param applicationId 申请ID
     * @return 奖惩申请信息
     */
    RewardPunishmentApplicationVo selectRewardPunishmentApplicationById(Long applicationId);

    /**
     * 新增奖惩申请
     *
     * @param bo 奖惩申请业务对象
     * @return 结果
     */
    Boolean insertRewardPunishmentApplication(RewardPunishmentApplicationBo bo);

    /**
     * 修改奖惩申请
     *
     * @param bo 奖惩申请业务对象
     * @return 结果
     */
    Boolean updateRewardPunishmentApplication(RewardPunishmentApplicationBo bo);

    /**
     * 批量删除奖惩申请
     *
     * @param applicationIds 需要删除的申请ID数组
     * @return 结果
     */
    Boolean deleteRewardPunishmentApplicationByIds(Long[] applicationIds);

    /**
     * 查询奖惩记录列表
     *
     * @param bo 奖惩记录业务对象
     * @return 奖惩记录列表
     */
    List<RewardPunishmentRecordVo> selectRewardPunishmentRecordList(RewardPunishmentRecordBo bo);

    /**
     * 查询奖惩记录列表(分页)
     *
     * @param bo        奖惩记录业务对象
     * @param pageQuery 分页参数
     * @return 奖惩记录分页列表
     */
    TableDataInfo<RewardPunishmentRecordVo> selectRewardPunishmentRecordList(RewardPunishmentRecordBo bo,
                    PageQuery pageQuery);

    /**
     * 通过记录ID查询奖惩记录
     *
     * @param recordId 记录ID
     * @return 奖惩记录
     */
    RewardPunishmentRecordVo selectRewardPunishmentRecordById(Long recordId);

    /**
     * 新增奖惩记录
     *
     * @param bo 奖惩记录业务对象
     * @return 结果
     */
    Boolean insertRewardPunishmentRecord(RewardPunishmentRecordBo bo);

    /**
     * 修改奖惩记录
     *
     * @param bo 奖惩记录业务对象
     * @return 结果
     */
    Boolean updateRewardPunishmentRecord(RewardPunishmentRecordBo bo);

    /**
     * 批量删除奖惩记录
     *
     * @param recordIds 需要删除的记录ID数组
     * @return 结果
     */
    Boolean deleteRewardPunishmentRecordByIds(Long[] recordIds);

    /**
     * 审批通过：写入审批信息并补齐记录字段
     *
     * @param bo 奖惩申请业务对象（需包含 applicationId、approverId、approvalRemark；可选
     *           recordTime、processingResult、impact）
     * @return 结果
     */
    Boolean approveRewardPunishment(RewardPunishmentApplicationBo bo);

    /**
     * 审批拒绝
     * @param bo
     * @return
     */
    Boolean rejectRewardPunishment(RewardPunishmentApplicationBo bo);
}
